/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.jiadakeji.ppm.modules.business.service;

import java.util.List;

import com.jiadakeji.ppm.modules.sys.utils.UserUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jiadakeji.ppm.common.persistence.Page;
import com.jiadakeji.ppm.common.service.CrudService;
import com.jiadakeji.ppm.modules.business.entity.Building;
import com.jiadakeji.ppm.modules.business.dao.BuildingDao;

/**
 * 楼栋Service
 * @author HHAOYU
 * @version 2019-07-08
 */
@Service
@Transactional(readOnly = true)
public class BuildingService extends CrudService<BuildingDao, Building> {

	@Override
	public Building get(String id) {
		return super.get(id);
	}
	@Override
	public List<Building> findList(Building building) {
		return super.findList(building);
	}
	@Override
	public Page<Building> findPage(Page<Building> page, Building building) {
		return super.findPage(page, building);
	}
	@Override
	@Transactional(readOnly = false)
	public void save(Building building) {
		super.save(building);
		UserUtils.removeCache(UserUtils.CACHE_BUILDING_LIST);
	}

	@Override
	@Transactional(readOnly = false)
	public void delete(Building building) {
		//TODO 删除其它关联表
		
		super.delete(building);
	}

}